<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="/topic_show">
    <table width="100%" cellpadding="4" cellspacing="0" border="1" style="border-collapse:collapse;" class="ForumText">
      <tr  style="text-align:center;background:#E7EBF7;height:22px;">
        <td style="width:120px;">Thành viên</td>
        <td>Trả lời</td>
      </tr>
      <xsl:apply-templates select="Reply"></xsl:apply-templates>
      <tr>
        <td colspan="2"  style="text-align:right;">
          <a>
            <xsl:attribute name="href">/desktops/forum/rss.aspx?tid=<xsl:value-of select="TID"/></xsl:attribute>
            <img src="/images/rss2.gif" border="0" />
          </a>
        </td>
      </tr>
    </table>
  </xsl:template>

  <!-- one Reply -->
  <xsl:template match="Reply">
    <tr>
      <xsl:if test="odd=''">
        <xsl:attribute name="style">background:#F0F6FC</xsl:attribute>
      </xsl:if>
      <td style="text-align:center;width:20%;" valign="top">
        <a>
          <xsl:attribute name="href">
            <xsl:value-of select="url_profile"></xsl:value-of>
          </xsl:attribute>
          <xsl:value-of select="UserName"></xsl:value-of>
          <br/>
          <xsl:if test="ImageUrl!=''">
            <img>
              <xsl:attribute name="src">
                <xsl:if test="/forum_admin/root_folder!=''">
                  <xsl:value-of select="/forum_admin/root_folder"></xsl:value-of>
                </xsl:if>
                <xsl:value-of select="ImageUrl"></xsl:value-of>
              </xsl:attribute>
              <xsl:attribute name="width">80</xsl:attribute>
              <xsl:attribute name="border">0</xsl:attribute>
            </img>
            <br/>
          </xsl:if>
        </a>
        <xsl:value-of select="Slogan"></xsl:value-of>
        <br/>
        <xsl:value-of select="Posts"></xsl:value-of>&#xa0; bài
      </td>
      <td valign="top">
        <xsl:value-of select="PostedDate"></xsl:value-of>
        <br/>
        <xsl:value-of select="Content"  disable-output-escaping="yes"></xsl:value-of>
        <div style="text-align:right;">
          <!--edit-->
          <xsl:if test="url_edit!=''">
            <a>
              <xsl:attribute name="href">
                <xsl:value-of select="url_edit"></xsl:value-of>
              </xsl:attribute>
              <xsl:attribute name="alt">Sửa bài viết</xsl:attribute>
              <img>
                <xsl:attribute name="border">0</xsl:attribute>
                <xsl:attribute name="src"><xsl:value-of select="/topic_show/root_folder"></xsl:value-of>/images/edit.gif</xsl:attribute>
              </img>
            </a>
          </xsl:if>
          &#xa0;
          <!-- quote -->
          <xsl:if test="url_quote!=''">
            <a>
              <xsl:attribute name="href">
                <xsl:value-of select="url_quote"></xsl:value-of>
              </xsl:attribute>
              <xsl:attribute name="alt">Trích dẫn bài viết này</xsl:attribute>
              <img>
                <xsl:attribute name="border">0</xsl:attribute>
                <xsl:attribute name="src"><xsl:value-of select="/topic_show/root_folder"></xsl:value-of>/images/quote.gif</xsl:attribute>
              </img>
            </a>
          </xsl:if>
        </div>
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet> 

